////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                                                                                                            //
//                                                         WNProject                                                          //
//                                                                                                                            //
//            This file is distributed under the BSD 2-Clause open source license. See License.txt for details.               //
//                                                                                                                            //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "WNPlatform/inc/WNSurfaceManager.h"
#include <X11/Xlib.h>
#include <GL/glx.h>

namespace WNPlatform {
    class WNSurfaceXWindows;
    class WNSurfaceManagerXWindows: public WNSurfaceManager {
    public:
        virtual WNSurfaceManagerError Initialize();
        virtual WNSurfaceManagerError CreateSurface(WN_UINT32 _x, WN_UINT32 _y, WN_UINT32 _width, WN_UINT32 _height, WNContainers::WNResourcePointer<WNSurface>& _surface);
        virtual WNSurfaceManagerError Release();
        virtual ~WNSurfaceManagerXWindows();
        WNSurfaceManagerXWindows();
    private:
        explicit WNSurfaceManagerXWindows(const WNSurfaceManagerXWindows& _other) {}
        Display* mDisplay;
        XVisualInfo* mVisualInfo;
        GLXFBConfig  mFBConfig;
        XSetWindowAttributes mWindowAttribs;
        int mScreen;
        Window mRootWindow;
    };
};
